/*
 *  Cero Project - Copyright   2006 The Cero Developement Team 
 *  (Michael Laguerre, Camille Roux, Matthieu Segret, Mathieu Sivade) 
 * 
 *  This program is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU General Public License as published by the Free 
 *  Software Foundation; either version 2 of the License, or (at your option) 
 *  any later version.
 * 
 *  This program is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 *  for more details.
 */

package org.ceroproject.games.base;

import java.util.Collection;

import org.ceroproject.games.ActionEvent;
import org.ceroproject.games.Card;


public class ActionLookAtCards extends ActionBase {
	private boolean reveal = false;
	
	public ActionLookAtCards() {
		super("Regarder les cartes");
	}
	
	public void executeAction() {
		reveal = true;
	}
	
	public Collection<Card> getCards() {
		if (reveal)
			return super.getEvent().getCards();
		else
			return null;
	}

	public boolean canAct(ActionEvent event) {
		return getEvent().getCards().size() > 0;
	}
}
